<%@page contentType="text/html;charset=utf-8" %>
<%@taglib prefix="s" uri="/struts-tags" %>   
<script type="text/javascript">
function mg_saveapppointofbilling(type)
{
    var name = document.getElementById("model.pointofbillingname").value;
    var fee = document.getElementById("model.fee").value;
    var code = document.getElementById("model.code").value;
    if (name == null || name == "" ||
    		fee == null || fee == "" ||
    		code == null || code == "")
    {
        alert("信息不完整！");
        return false;
    }

    if (!confirm("确定继续？"))
    {
        return false;
    }
    var url = "mg/apppointofbilling/save.do?type=" + type;
    var objectid = "mg_apppointofbilling";
    postXMLHttpRequest(url, "myform", objectid); 
}
</script>
 <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="5"></td>
    <td>   
  <form id="myform" name="myform"
        method="post" action="">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td colspan="3">
        <table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><img src="images/table_top_left.jpg" width="20" height="15" /></td>
            <td><img src="images/table_top_bg.jpg" width="770" height="15"/></td>
            <td align="right">
              <img src="images/table_top_right.jpg" width="20" height="15" /></td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="25" colspan="3" class="table_blue">
        <strong><img src="images/dot.jpg" width="13" height="9">SDK提供商信息</strong>
		<input type="hidden" id="model.appnumber" name="model.appnumber"  value="<s:property value="model.appnumber" />" />
		<input type="hidden" id="cpinfo.id" name="cpinfo.id"  value="<s:property value="cpinfo.id" />" />
        <input type="hidden" id="model.id" name="model.id"  value="<s:property value="model.id" />" />
        <input type="hidden" id="model.createuser" name="model.createuser"  value="<s:property value="model.createuser" />" />
        <input type="hidden" id="model.createdate" name="model.createdate"  value="<s:property value="model.createdate" />" />
        </td>
    </tr> 
     <tr>
      <td class="table_w1" align="center" width="20%">&nbsp;<font color="red">(*)</font>计费点代码：</td>
      <td class="table_w2" colspan="2">&nbsp;
        <input id="model.code" name="model.code" type="text" size="60" maxlength="4" 
          value="<s:property value="model.code" />" <s:if test="!type.equals('insert')" >readonly="readonly"</s:if>/><font color="red">(*)</font>建议4位数字，如0001.</td>
    </tr>
    <tr>
      <td class="table_w1" align="center" width="20%">&nbsp;<font color="red">(*)</font>计费点名称：</td>
      <td class="table_w2" colspan="2">&nbsp;
        <input id="model.pointofbillingname" name="model.pointofbillingname" type="text" size="60" 
          value="<s:property value="model.pointofbillingname" />" /></td>
    </tr>
    <tr>
      <td class="table_w1" align="center" width="20%">&nbsp;<font color="red">(*)</font>资费（分）：</td>
      <td class="table_w2" colspan="2">&nbsp;
        <input id="model.fee" name="model.fee" type="text" size="60" 
          value="<s:property value="model.fee" />" /></td>
    </tr>
    <tr>
      <td class="table_w1" align="center" width="20%">&nbsp;<font color="red">(*)</font>备注：</td>
      <td class="table_w2" colspan="2">&nbsp;
          <textarea id="model.remark" name="model.remark"  rows="5" cols="40"><s:property value="model.remark" /></textarea>
          </td>
    </tr>
    <s:iterator value="sdkplist" status="stat">
    	<tr>
	      <td class="table_w1" align="center" width="20%">&nbsp;<s:property value="sdkname"/>参数：</td>
	      <td class="table_w2" colspan="2">&nbsp;
          <textarea id="sdkparamater_<s:property value="id"/>" name="sdkparamater_<s:property value="id"/>"  rows="5" cols="40"><s:if test="type.equals('insert')" ><s:property value="%{getDefaultParamater(id)}"/></s:if><s:if test="psclist.size()>0"><s:iterator value="psclist" status="stat1"><s:if test="sdkplist.get(#stat.index).id==sdkprovidersid"><s:property value="prarmatervalue"/></s:if></s:iterator></s:if></textarea>
          <font color="red">(*)</font>格式：<s:property value="%{getDefaultParamater(id)}"/>
          </td>
    </tr>
    </s:iterator>
    <tr>
      <td colspan="3" class="table_w1" align="center">
        <s:if test="type.equals('insert')" >
        <button id="btn2" dojoType="dijit.form.Button"
            onclick="mg_saveapppointofbilling('insert');">添加</button>
        </s:if>
        <s:else>
        <button id="btn2" dojoType="dijit.form.Button"
            onclick="mg_saveapppointofbilling('update');">修改</button>
        &nbsp;&nbsp;        
        <button id="btn3" dojoType="dijit.form.Button"
            onclick="mg_saveapppointofbilling('delete');">删除</button>
        </s:else>
      </td>      
    </tr>
    <tr> 
      <td colspan="3" background="images/table_bom_bg.jpg">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="images/table_bom_left.jpg" width="20" height="15"></td>
          <td></td>
          <td align="right">
            <img src="images/table_bom_right.jpg" width="20" height="15"></td>
        </tr>
        </table>
      </td>
    </tr>
  </table>  
  </form>
  </td>
  <td width="5"></td>
  </tr>
  </table>